//======================================================================
//    This file is part of baijie_interface
//
//    Copyright (C) 2023 Shenzhen Baijie Technology Co., Ltd.All rights reserved.
//
//    filename : sim_thread.cpp
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//======================================================================

#include "sim_thread.h"

sim_thread::sim_thread(QObject *parent) : QObject(parent)
{

}

void sim_thread::sim_disconnect_thread()
{
    QString strResult = g_simInterface->simDisconnect();
    emit send_sim_msg(EnumSimDisconnectSignal,strResult);
}

void sim_thread::sim_connect_thread()
{
    QString strResult = g_simInterface->simConnect();
    emit send_sim_msg(EnumSimConnectSignal,strResult);
}

void sim_thread::sim_set_enbale(int flag)
{
    g_simInterface->setSimEnable(flag);
}

void sim_thread::sim_connect_agian_thread()
{
    QString strResult = g_simInterface->simConnectAgain();
    emit send_sim_msg(EnumSimConnectSignal,strResult);
}

void sim_thread::sim_status_thread()
{
    QString strResult = g_simInterface->getSimStatus();
    emit send_sim_msg(EnumSimStatusSignal,strResult);
}

void sim_thread::sim_module_status()
{
    QString strResult = g_simInterface->getSimModuleStatus();
    emit send_sim_msg(EnumSimModuleStatusSignal,strResult);
}
